Mac OS Sound

| Previous | Chapter Contents | Chapter Top | Next |

Determining the Sound Manager Version

The Sound Manager provides a routine, SndSoundManagerVersion , which returns the currently installed version.

Listing 8 shows the simplest method you can use to check for Sound Manager 3.1 or later. Note that the NumVersionVariant structure is being used from the lastest version of the MacTypes interface file. This is a union of the old NumVersion structure with its various parts, and a 32 bit long value which allows for easy comparisons.

Listing 8 The simplest method for determing the Sound Manager version

Boolean HasSoundManager3_1(void)
{
NumVersionVariant version;

version.parts = SndSoundManagerVersion();
return (version.whole >= 0x03100000) // version 3.1
}

© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |